package com.yupi.yuoj.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yupi.yuoj.model.dto.membershiporder.MembershipOrderQueryRequest;
import com.yupi.yuoj.model.entity.MembershipOrder;
import com.yupi.yuoj.model.vo.MembershipOrderVO;

import javax.servlet.http.HttpServletRequest;

/**
* @author admin
* @description 针对表【membership_order(浼氬憳璁㈠崟琛)】的数据库操作Service
* @createDate 2025-11-01 21:28:42
*/
public interface MembershipOrderService extends IService<MembershipOrder> {

    /**
     * 校验会员订单
     *
     * @param membershipOrder
     * @param add
     */
    void validMembershipOrder(MembershipOrder membershipOrder, boolean add);

    /**
     * 获取查询包装类
     *
     * @param membershipOrderQueryRequest
     * @return
     */
    QueryWrapper<MembershipOrder> getQueryWrapper(MembershipOrderQueryRequest membershipOrderQueryRequest);

    /**
     * 获取会员订单封装
     *
     * @param membershipOrder
     * @param request
     * @return
     */
    MembershipOrderVO getMembershipOrderVO(MembershipOrder membershipOrder, HttpServletRequest request);

    /**
     * 分页获取会员订单封装
     *
     * @param membershipOrderPage
     * @param request
     * @return
     */
    Page<MembershipOrderVO> getMembershipOrderVOPage(Page<MembershipOrder> membershipOrderPage, HttpServletRequest request);
}
